package com.wondertek.poms.dao.po;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Proxy;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @author evan0213
 * @description
 */
@Data
@Entity
@Table(name = "SP_INFO")
@DynamicUpdate
@DynamicInsert
@Proxy(lazy = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SpInfo {
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SP_INFO_SEQ")
	@SequenceGenerator(name = "SP_INFO_SEQ", allocationSize = 1, sequenceName = "SP_INFO_SEQ")
	private Long id;
	@Column(name = "SP_ID")
	private Long spId;
	@Column(name = "NAME")
	private String name;
	@Transient
	private String spIdAndName;

}
